﻿@model SEMS.Models.Student

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Admin/Shared/_Layout.cshtml";
}

@Html.ValidationSummary(true, "修改失败!")

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


<h2>编辑</h2>
@using (Html.BeginForm(new
{
    id = ViewBag.ID
}))
{
    <fieldset>
        <legend>修改学生信息</legend>
        <!--姓名-->
        <div class="editor-label">
            @Html.LabelFor(m => m.student_name)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(m => m.student_name)
            @Html.ValidationMessageFor(m => m.student_name)
        </div>
        <!--性别-->
        <div class="editor-label">
            @Html.LabelFor(m => m.student_sex)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(m => m.student_sex, new List<SelectListItem> { 
           new SelectListItem(){ Text = "男", Value = "男" }, 
           new SelectListItem(){ Text = "女", Value = "女" }})
            @Html.ValidationMessageFor(m => m.student_sex)
        </div>
        <!--班级-->
        <div class="editor-label">
            @Html.LabelFor(m => m.class_id)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(m=>m.class_id,(List<SelectListItem>)ViewBag.ClassList)
        </div>
        <!--小班号-->
        <div class="editor-label">
            @Html.LabelFor(m => m.class_small_id)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(m => m.class_small_id)
            @Html.ValidationMessageFor(m => m.class_small_id)
        </div>

        <input type="submit" value="确认修改" />

    </fieldset>
}